Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: metric lag calculation for update events #1244

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

adityathebe
Copy link
Member

@adityathebe adityathebe commented Dec 9, 2024

  • the lastUpdated time was calculated against the informer's registration time instead of the current time.

Here are some logs where time.Now() was just a few ms ahead.

20:57:44.131 WRN (watch.homelab) Pod/default/ittools-6cbf6bcbd9-88h5j has last updated time -131.105383ms into the future. now=2024-12-09 15:12:44.131105383 +0000 UTC, lastupdatedTime=2024-12-09 15:12:44 +0000 UTC
20:57:44.139 WRN (watch.homelab) Pod/default/ittools-6cbf6bcbd9-74n7m has last updated time -139.018936ms into the future. now=2024-12-09 15:12:44.139018936 +0000 UTC, lastupdatedTime=2024-12-09 15:12:44 +0000 UTC
20:57:44.15 WRN (watch.homelab) Pod/default/ittools-6cbf6bcbd9-88h5j has last updated time -149.744873ms into the future. now=2024-12-09 15:12:44.149744873 +0000 UTC, lastupdatedTime=2024-12-09 15:12:44 +0000 UTC
20:57:44.162 WRN (watch.homelab) Pod/default/ittools-6cbf6bcbd9-74n7m has last updated time -162.311864ms into the future. now=2024-12-09 15:12:44.162311864 +0000 UTC, lastupdatedTime=2024-12-09 15:12:44 +0000 UTC

Majority of the events had bad timestamps due to this

image

@adityathebe adityathebe force-pushed the fix/metric-lag-calculation branch from 198f687 to 1aef30d Compare December 9, 2024 15:19
@adityathebe adityathebe requested a review from moshloop December 9, 2024 15:19
@adityathebe adityathebe force-pushed the fix/metric-lag-calculation branch from 1aef30d to c3905aa Compare December 9, 2024 15:44
the lastUpdated time was calculated against the informer's registration
time instead of the current time.
@adityathebe adityathebe force-pushed the fix/metric-lag-calculation branch from c3905aa to 9308652 Compare December 9, 2024 15:49
@moshloop moshloop merged commit 1e93041 into main Dec 9, 2024
9 checks passed
@moshloop moshloop deleted the fix/metric-lag-calculation branch December 9, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants